﻿using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;

namespace Xcapp.SimpleSalute
{
    /// <summary>
    /// A simple hello message.
    /// </summary>
    [Export(typeof(IOperation))]
    [OperationKey("SSL")]
    internal class SimpleSalutation : IOperation
    {
        private string[] _descriptions;

        /// <summary>
        /// Executes this instance.
        /// </summary>
        /// <returns></returns>
        public bool Execute()
        {
            Console.WriteLine("Hello World!");

            return true;
        }

        /// <summary>
        /// Gets the descriptions for the operation.
        /// </summary>
        /// <value>
        /// The descriptions.
        /// </value>
        public IEnumerable<string> Descriptions
        {
            get
            {
                if (this._descriptions == null)
                {
                    this._descriptions = new string[] { "Simple hello message" };
                }

                return this._descriptions;
            }
        }
    }
}